package com.monlyu.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import com.monlyu.annotation.Comment;
import com.monlyu.util.StringUtil;

/*******************************************************************************
 * <b>功能描述☞</b>稿件表<br>
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>news<br>
 * <b>文件路径☞</b>com.monlyu.vo.Manuscript.java<br>
 * <b>开发日期☞</b>2010-2-11 <br>
 * 
 * @author skw
 * @since JDK 5
 * @version 1.0.8
 ******************************************************************************/
@Entity(name = "t_manuscript")
public class Manuscript extends BaseVo {

	/** 草稿 */
	public static final int STATUS_DRAFT = 0;
	/** 一审中 */
	public static final int STATUS_AUDITING_ONE = 1;
	/** 二审中 */
	public static final int STATUS_AUDITING_TWO = 2;
	/** 三审中 */
	public static final int STATUS_AUDITING_THREE = 3;
	/** 审核完毕 */
	public static final int STATUS_DONE = 4;

	/** 毙稿 */
	public static final int STATUS_KILLED = -100;

	@Id
	@Column(name = "m_id")
	@Comment(common = "编号")
	private Long id;

	@Column(name = "m_title")
	@Comment(common = "标题")
	private String title;

	@Column(name = "m_unit")
	@Comment(common = "报道单位")
	private long unit;

	@Column(name = "m_auditZt")
	@Comment(common = "审核状态（包括是否提交审核）：0,未提交（不能审核）、1、待一审（一审中）、2、待二审、3、待三审")
	private int auditZt;

	@Column(name = "m_column")
	@Comment(common = "所属栏目")
	private long column;

	@Column(name = "m_where")
	@Comment(common = "地域编号")
	private long where;

	@Column(name = "m_category")
	@Comment(common = "稿件分类：")
	private long category;

	@Column(name = "m_mType")
	@Comment(common = "题材类别：")
	private long owetype;

	@Column(name = "m_bcType")
	@Comment(common = "播出类型")
	private long bcType;

	@Column(name = "m_dataSt")
	@Comment(common = "资料状态")
	private long dataSt;

	@Column(name = "m_timeLong")
	@Comment(common = "播出时长")
	private long timeLong;

	@Column(name = "m_remark", length = MAX_VCHAR_MYSQL)
	@Comment(common = "来源描述备注")
	private String remark;

	@Column(name = "m_content", length = LENGTH_8000)
	@Comment(common = "稿件内容")
	private String content;

	@Column(name = "m_zimu", length = MAX_VCHAR_MYSQL)
	@Comment(common = "字幕")
	private String zimu;

	@Column(name = "m_daoyu", length = LENGTH_2000)
	@Comment(common = "导语")
	private String daoyu;

	@Column(name = "m_bianhouyu", length = MAX_VCHAR_MYSQL)
	@Comment(common = "编后语")
	private String bianhouyu;

	@Column(name = "m_kouBo")
	@Comment(common = "是否为口播")
	private Boolean kouBo;

	@Column(name = "m_createDate")
	@Comment(common = "撰稿日期")
	private Date createDate;

	@Column(name = "m_usedDate")
	@Comment(common = "使用日期")
	private Date usedDate;

	@ManyToOne
	@JoinColumn(name = "m_user", nullable = false)
	@Comment(common = "撰稿人")
	private User user;

	/** 此等级是记录的Enums表的枚举类型，关联id，允许用户用A、B、C等字符串作为等级 */
	@Column(name = "m_level")
	@Comment(common = "等级")
	private Long level;

	@Column(name = "m_score")
	@Comment(common = "分数")
	private float score;

	@Column(name = "m_times")
	@Comment(common = "使用次数")
	private int times;

	@Column(name = "m_adv")
	@Comment(common = "是否是广告")
	private boolean adv;

	@Column(name = "m_urgent")
	@Comment(common = "是否是急稿")
	private boolean urgent;

	@Column(name = "ma_puserScore")
	@Comment(common = "配音人分数")
	private Long puserScore;

	@ManyToOne
	@JoinColumn(name = "m_puser")
	@Comment(common = "配音人员")
	private User puser;

	@Column(name = "m_tags", length = MAX_VCHAR_MYSQL)
	private String tags;

	@Column(name = "m_ispblic", nullable = false)
	@Comment(common = "是否加入公共稿件库")
	private boolean is2Public = false;

	@Column(name = "m_comment", length = 1000)
	private String comment;

	@ManyToOne
	@JoinColumn(name = "m_auditUser")
	@Comment(common = "下一审核人员")
	private User auditUser;

	public User getAuditUser() {
		return auditUser;
	}

	public void setAuditUser(User auditUser) {
		this.auditUser = auditUser;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public boolean isIs2Public() {
		return is2Public;
	}

	public void setIs2Public(boolean is2Public) {
		this.is2Public = is2Public;
	}

	/** 临时属性，记录此稿件的所有记者，用于显示到页面上 */
	@Transient
	private String reportorName;

	public User getPuser() {
		return puser;
	}

	public void setPuser(User puser) {
		this.puser = puser;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public String eclipseTitle() {
		return StringUtil.eclipse(title);
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public long getUnit() {
		return unit;
	}

	public void setUnit(long unit) {
		this.unit = unit;
	}

	public int getAuditZt() {
		return auditZt;
	}

	public void setAuditZt(int auditZt) {
		this.auditZt = auditZt;
	}

	public long getColumn() {
		return column;
	}

	public void setColumn(long column) {
		this.column = column;
	}

	public void setColumn(String column) {
		this.column = Long.parseLong(column);
	}

	public long getWhere() {
		return where;
	}

	public void setWhere(long where) {
		this.where = where;
	}

	public long getCategory() {
		return category;
	}

	public void setCategory(long category) {
		this.category = category;
	}

	public long getOwetype() {
		return owetype;
	}

	public void setOwetype(long owetype) {
		this.owetype = owetype;
	}

	public long getBcType() {
		return bcType;
	}

	public void setBcType(long bcType) {
		this.bcType = bcType;
	}

	public long getTimeLong() {
		return timeLong;
	}

	public void setTimeLong(long timeLong) {
		this.timeLong = timeLong;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getZimu() {
		return zimu;
	}

	public void setZimu(String zimu) {
		this.zimu = zimu;
	}

	public String getDaoyu() {
		return daoyu;
	}

	public void setDaoyu(String daoyu) {
		this.daoyu = daoyu;
	}

	public String getBianhouyu() {
		return bianhouyu;
	}

	public void setBianhouyu(String bianhouyu) {
		this.bianhouyu = bianhouyu;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public float getScore() {
		return score;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public int getTimes() {
		return times;
	}

	public void setTimes(int times) {
		this.times = times;
	}

	public boolean isAdv() {
		return adv;
	}

	public void setAdv(boolean adv) {
		this.adv = adv;
	}

	public boolean isUrgent() {
		return urgent;
	}

	public void setUrgent(boolean urgent) {
		this.urgent = urgent;
	}

	public long getDataSt() {
		return dataSt;
	}

	public void setDataSt(long dataSt) {
		this.dataSt = dataSt;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long getLevel() {
		return level;
	}

	public void setLevel(Long level) {
		this.level = level;
	}

	public Long getPuserScore() {
		return puserScore;
	}

	public void setPuserScore(Long puserScore) {
		this.puserScore = puserScore;
	}

	public String getReportorName() {
		return reportorName;
	}

	public void setReportorName(String reportorName) {
		this.reportorName = reportorName;
	}

	public Boolean getKouBo() {
		return kouBo;
	}

	public void setKouBo(Boolean kouBo) {
		this.kouBo = kouBo;
	}

	public Date getUsedDate() {
		return usedDate;
	}

	public void setUsedDate(Date usedDate) {
		this.usedDate = usedDate;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

}